<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<th:block th:fragment="breadcrumb">
    <section th:if="${breadcrumb==true}" class="content-header" id="breadcrumb-env">
        <ol class="breadcrumb">
            <li th:each="breadcrumb,stat : ${breadcrumbs}" th:class="${stat.last}?'active':''">
                <th:block th:if="${stat.first}"><i th:class="${breadcrumb.icon}"></i></th:block>
                <strong th:if="${stat.last}">[[${breadcrumb.name}]]</strong>
                <a th:href="@{/${breadcrumb.url}}" th:unless="${stat.last}">[[${breadcrumb.name}]]</a>
            </li>
        </ol>
    </section>
    <script th:src="${ctx}+'lib/jquery/jquery.min.js?v=2.1.4'" type="text/javascript"></script>
    <script th:if="${breadcrumb==true}">
        jQuery(document).ready(function($) {
            $("#breadcrumb-env a").on('click', function (ev) {
                ev.preventDefault();

                // init frame content
                var url = $(this).attr('href');
                if (url && url != '' && url != '#') {
                    var $iframe = top.$('.mainContent').find('iframe.iframe_index');
                    if ($iframe)
                        $iframe.attr('src', url);
                }
            });
        });
    </script>
</th:block>

</html>
